import buildermode.Zh0202Builder;
import buildermode.Zh0202ConcreteBuilder;
import buildermode.Zh0202Director;
import buildermode.Zh0202Player;
import statemode.Zh0202NormalState;
import statemode.Zh0202State;

/**
 * @author: zh
 * @date: 2021/11/18 11:30
 * @version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        //建造者模式建造player
        Zh0202Builder builder = new Zh0202ConcreteBuilder();
        Zh0202Director director = new Zh0202Director(builder);
        Zh0202Player player = director.construct(1);
        //为玩家添加状态
        Zh0202State state = new Zh0202NormalState(player);
        player.setState(state);
        player.behave();
        player.attacked();
        player.attacked();
        player.attacked();
        player.isReady();
        player.shotting();
    }
}
